package com.umeox.moto.watch.fitness.db.model;

import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

/**
 * Created by Rambo 2021/11/19
 * Describe:
 */
@Entity(tableName = ChallengeRecord.TABLE_NAME)
public class ChallengeRecord {
    @Ignore
    public static final String TABLE_NAME = "challenge_record";

    @PrimaryKey(autoGenerate = true)
    public int _id;

    /**
     * 运动类型
     * 1:walk;2:Run;3:Swim;4:Cycle;5:Football;6:Gym;7:Jumprope;8:Yoga;
     */
    public int sportType;

    /**
     * 开始时间，时间戳
     */
    public long startTime;

    /**
     * 结束时间。时间戳
     */
    public long endTime;

    /**
     * 运动总时长 单位：分钟
     */
    public int totalTime;

    /**
     * 奖励数量
     */
    public int rewardValue;

    /**
     * 当日时间戳，没有时分秒
     */
    public int todayMillis;

    /**
     * 是否已上传
     * 0 未上传，1.已上传
     */
    public boolean isUpload;


    @Override
    public String toString() {
        return "ChallengeRecord{" +
                "_id=" + _id +
                ", sportsType=" + sportType +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", totalTime=" + totalTime +
                ", rewardValue=" + rewardValue +
                ", todayMillis=" + todayMillis +
                ", isUpload=" + isUpload +
                '}';
    }
}
